﻿<%@ Page Language="C#" AutoEventWireup="true" EnableViewState="false" CodeBehind="Design.aspx.cs"
    Inherits="Card.Web.Design" %>

<%@ Register Src="Controls/Header.ascx" TagName="Header" TagPrefix="uc1" %>
<%@ Register Src="Controls/Footer.ascx" TagName="Footer" TagPrefix="uc1" %>
<%@ Register Src="Controls/LogoDesign.ascx" TagName="Logo" TagPrefix="uc1" %>
<%@ Import Namespace="Card.Common" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title><%=this.Template == null ? string.Empty:this.Template.Name%>_<%=this.AreaDesc %>名片设计|名片制作|名片下载|名片模板下载_<%=SiteName %></title>
    <link href="css/layout.css" type="text/css" rel="Stylesheet" />
    <link href="css/mp.css" type="text/css" rel="Stylesheet" />
    <link href="css/ui-lightness/jquery-ui-1.9.2.custom.min.css" rel="Stylesheet" />
    <link href="css/evol.colorpicker.css" rel="Stylesheet" />

    <script type="text/javascript">
        var imgServer = '<%=Card.Utility.ImageUtilty.ImageServer + "/" %>'; 
    </script>

    <script src="JavaScript/jquery-1.8.3.min.js" type="text/javascript"></script>

    <script src="JavaScript/design.js" type="text/javascript"></script>

    <script src="JavaScript/math-operation.js" type="text/javascript"></script>

    <script src="JavaScript/jquery-ui-1.9.2.custom.min.js" type="text/javascript"></script>

    <script src="JavaScript/common.js" type="text/javascript"></script>

    <script src="JavaScript/evol.colorpicker.min.js" type="text/javascript"></script>

</head>
<body>
    <form id="form1" runat="server">
    <uc1:Header ID="header" LinkIndex="1" runat="server" />
    <div class="adv">
        <img alt="" src="themes/<%=this.Theme %>/Images/adv2.gif" />
    </div>
    <div class="main solid_border">
        <div class="top_info clear-fix">
            <h2>
                名片在线制做<%= this.IsUserCard ? string.Format("--[{0}]的名片",this.Passport.UserName):string.Empty %></h2>
        </div>
        <div class="card_editor_key clear-fix">
            <div class="left">
                <div class="tab_ctn_search clear-fix">
                    <span class="Tel_name">
                        <asp:Literal ID="ltlCardName" runat="server"></asp:Literal>
                    </span>
                    <label for="Select_vora" class="Select_Corner" style="float: right;">
                        <input id="ckbRound" onclick="round_cornor()" type="checkbox" /><span id="Select_vora_text">圆角预览</span>
                    </label>
                </div>
                <div class="card_tpl_Show clear-fix">
                    <div class="a_load_prev">
                        <asp:HyperLink ID="linkPrev" runat="server"></asp:HyperLink>
                    </div>
                    <ul id="card_ctn" runat="server">
                        <li id="card_front" onclick="selectCardSide('front');" class="c"><span class="dchushuix">
                        </span>
                            <asp:Literal ID="ltlFrontImages" runat="server"></asp:Literal>
                            <b class="lt"></b><b class="rt"></b><b class="lb"></b><b class="rb"></b>
                            <asp:Image ID="FaceImg" AlternateText="点击切换到正面" runat="server" />
                        </li>
                        <li id="card_back" onclick="selectCardSide('back');"><span class="dchushuix"></span>
                            <asp:Literal ID="ltlBackImages" runat="server"></asp:Literal>
                            <b class="lt"></b><b class="rt"></b><b class="lb"></b><b class="rb"></b>
                            <asp:Image ID="BackImg" AlternateText="点击切换到反面" runat="server" />
                        </li>
                    </ul>
                    <div class="a_load_next">
                        <asp:HyperLink ID="linkNext" runat="server"></asp:HyperLink>
                    </div>
                </div>
                <div style="height: 26px; padding-top: 3px; padding-bottom: 10px;">
                    <div class="ico" style="display: block;">
                        用户排版时，尽量在灰线内，防止裁剪时正常误差0.5-2mm</div>
                </div>
            </div>
            <div class="right" id="card_editor_form_ctn">
                <div class="tab_ctn_nav">
                    <ul>
                        <li class="front bg_hover" onmouseover="selectCardSide('front');">正&nbsp;&nbsp;面</li>
                        <li class="back" onmouseover="selectCardSide('back');">反&nbsp;&nbsp;面</li>
                    </ul>
                    <ul style="right: 10px; width: 100px; float: right">
                        <input type="button" value="增加字段" style="margin-top: 6px;" class="button" onclick="dialog_add_field()" />
                    </ul>
                </div>
                <div id="EditorYouIfo">
                    <ul id="card_form_front" class="form">
                        <uc1:Logo runat="server" ID="frontLogo" ImageID="FLImg" Visible="true" />
                        <asp:Literal ID="ltlFrontFields" runat="server"></asp:Literal>
                    </ul>
                    <ul id="card_form_back" class="form" style="display: none;">
                        <uc1:Logo runat="server" ID="backLogo" ImageID="BLImg" Visible="true" />
                        <asp:Literal ID="ltlBackFields" runat="server"></asp:Literal>
                    </ul>
                </div>
                <div class="cardkeyOperat">
                    <div class="operat_top">
                        <div class="clear-fix">
                            <button type="button" id="save_card" onclick="validateLogin(saveMP);return false;"
                                style="background-position: 0px 1px;">
                            </button>
                            <%--<button type="button" id="download_card" onclick="downMp();return false;" style="background-position: 0px -69px;">
                            </button>--%>
                            <button type="button" id="print_card" onclick="validateLogin(printMP);return false;">
                            </button>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="adv" id="order_silder" style="display: none">
        <ul>
            <li style="background-color: #F5F5F5; height: 35px; line-height: 35px; padding-left: 20px;">
                最新订单....</li>
        </ul>
        <div style="height: 250px; overflow: hidden;">
            <table border="0" width="100%" id="tb_order">
            </table>
        </div>
    </div>
    <div id='add_field' style="display: none;">
        <table>
            <tr>
                <td align="center">
                    <label for="rdbFront">
                        字段文本</label><input class="input" maxlength="100" type="text" id="content" />
                </td>
            </tr>
            <tr>
                <td align="center">
                    <p>
                        <input type="radio" id="rdbFront" name="rdbFaceType" value="F" checked /><label for="rdbFront">正面</label>
                        <input type="radio" id="rdbBack" name="rdbFaceType" value="B" /><label for="rdbBack">反面</label>
                    </p>
                </td>
            </tr>
            <tr>
                <td align="center">
                    <input type="button" value="确定" class="button" onclick="add_field()" />
                </td>
            </tr>
        </table>
    </div>
    <uc1:Footer ID="footer" runat="server" />
    <asp:Literal ID="ltlInitScript" runat="server"></asp:Literal>
    <asp:HiddenField ID="hndInfo" runat="server" />
    <asp:HiddenField ID="hndUserCardID" runat="server" />
    <div style="display: none">
        <div id="emptyField">
            <%= CardWebUtility.CreateFieldHTML("{FACE}", "{SORT}", "{CONTENT}", "5", "5", "R", "#000000", "ST", "15","R")%></div>
        <div id="emptyFieldImg">
            <%= CardWebUtility.CreateFieldImageHTML("{SORT}","{FACE}") %></div>
    </div>
    </form>
</body>
</html>
